package apiday02;

public class Day09Demo {
    public static void main(String[] args) {
        /**
         * time:2022/09/23
         * author:lihangyang
         */
        String path = "http://localhost:8088/myweb/reg?name=zhangsan&pwd=123456&nick=san&age=16";
        String[] str = path.split("\\?");
        System.out.println(str[1]);

        String str1 = str[1].toString();
        String[] str2 = str1.split("\\&");

        for (int i = 0; i <str2.length; i++) {
            String[] arr2 = str2[i].split("\\=");
            System.out.println("参数名为："+arr2[0]+"参数值为："+arr2[1]);
        }
    }
}
